-- GENERATED SPELL FOR [Razelikh the Defiler] --


function spell0_7664(pUnit, Event) --@Decimate,n/a--
pUnit:FullCastSpellOnTarget(13459,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7664', 30345, 1)
end

function spell1_7664(pUnit, Event) --@Flames of Chaos,n/a--
pUnit:FullCastSpellOnTarget(10854,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7664', 5000, 1)
end

function spell2_7664(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(8269,pUnit)
pUnit:RegisterEvent('Sorts_7664', 598, 1)
end

function spell3_7664(pUnit, Event) --@Mana Burn,Self--
pUnit:FullCastSpellOnTarget(12745,pUnit)
pUnit:RegisterEvent('Sorts_7664', 3000, 1)
end

function spell4_7664(pUnit, Event) --@Razelikh\'s Tear I,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(10864,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7664', 1, 1)
end

function spell5_7664(pUnit, Event) --@Razelikh\'s Tear II,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(10866,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_7664', 1, 1)
end

function spell6_7664(pUnit, Event) --@Strong Cleave,n/a--
pUnit:FullCastSpellOnTarget(8255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7664', 10349, 1)
end

function Sorts_7664(pUnit, Event)
local choix_sorts_7664 = math.random(0, 6)
if choix_sorts_7664 == 0 then
pUnit:RegisterEvent('spell0_7664', 1, 1)
end
if choix_sorts_7664 == 1 then
pUnit:RegisterEvent('spell1_7664', 1, 1)
end
if choix_sorts_7664 == 2 then
pUnit:RegisterEvent('spell2_7664', 1, 1)
end
if choix_sorts_7664 == 3 then
pUnit:RegisterEvent('spell3_7664', 1, 1)
end
if choix_sorts_7664 == 4 then
pUnit:RegisterEvent('spell4_7664', 1, 1)
end
if choix_sorts_7664 == 5 then
pUnit:RegisterEvent('spell5_7664', 1, 1)
end
if choix_sorts_7664 == 6 then
pUnit:RegisterEvent('spell6_7664', 1, 1)
end
end

function mob7664_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7664', math.random(1500, 3000), 1)
end

function mob7664_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7664_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7664_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7664, 1, 'mob7664_Action')
RegisterUnitEvent(7664, 2, 'mob7664_Leave')
RegisterUnitEvent(7664, 3, 'mob7664_Kill')
RegisterUnitEvent(7664, 4, 'mob7664_Die')
